home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / demos / VisualAge for Java 2.0 Entry / setup / data1.cab / ide-e / IDE / cache / 1B6OPM0 (.txt) < prev    next >
Encoding:
Java Class File  |  1998-09-16  |  1.6 KB  |  45 lines

  1. package com.sun.java.swing.plaf.metal;
  2.  
  3. import com.sun.java.swing.Icon;
  4. import com.sun.java.swing.plaf.UIResource;
  5. import java.awt.Component;
  6. import java.awt.Graphics;
  7. import java.io.Serializable;
  8.  
  9. class MetalIconFactory$FileChooserHomeFolderIcon implements Icon, UIResource, Serializable {
  10.    public void paintIcon(Component c, Graphics g, int x, int y) {
  11.       g.translate(x, y);
  12.       g.setColor(MetalLookAndFeel.getPrimaryControlInfo());
  13.       g.drawLine(8, 1, 1, 8);
  14.       g.drawLine(8, 1, 15, 8);
  15.       g.drawLine(11, 2, 11, 3);
  16.       g.drawLine(12, 2, 12, 4);
  17.       g.drawLine(3, 7, 3, 15);
  18.       g.drawLine(13, 7, 13, 15);
  19.       g.drawLine(4, 15, 12, 15);
  20.       g.drawLine(6, 9, 6, 14);
  21.       g.drawLine(10, 9, 10, 14);
  22.       g.drawLine(7, 9, 9, 9);
  23.       g.setColor(MetalLookAndFeel.getControlDarkShadow());
  24.       g.fillRect(8, 2, 1, 1);
  25.       g.fillRect(7, 3, 3, 1);
  26.       g.fillRect(6, 4, 5, 1);
  27.       g.fillRect(5, 5, 7, 1);
  28.       g.fillRect(4, 6, 9, 2);
  29.       g.drawLine(9, 12, 9, 12);
  30.       g.setColor(MetalLookAndFeel.getPrimaryControl());
  31.       g.drawLine(4, 8, 12, 8);
  32.       g.fillRect(4, 9, 2, 6);
  33.       g.fillRect(11, 9, 2, 6);
  34.       g.translate(-x, -y);
  35.    }
  36.  
  37.    public int getIconWidth() {
  38.       return 18;
  39.    }
  40.  
  41.    public int getIconHeight() {
  42.       return 18;
  43.    }
  44. }
  45.